diff options
author | Patrick Burke <patrick.burke@nokia.com> | 2011-07-11 12:36:48 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-11 06:49:52 +0200 |
commit | 6ba003787048f63a52e88a6d19ee1b77172d98ac (patch) | |
tree | 0aa0b80f19501a9a33e6673eefea980503fe58a0 | |
parent | 302e1284b549e82323ef1932792ad5108f2f07a7 (diff) |
Handle oddly-cased qrc: statements since QUrl doesn't.
Change-Id: I9d0053319104d084e85fa939cb1ed6079fc711ed
Reviewed-on: http://codereview.qt.nokia.com/1390
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Julian de Bhal <julian.debhal@nokia.com>
-rw-r--r-- | src/quick3d/qdeclarativemesh.cpp | 2 | ||||
-rw-r--r-- | src/threed/textures/qgltexture2d.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/quick3d/qdeclarativemesh.cpp b/src/quick3d/qdeclarativemesh.cpp index 49f68a21..f7de4a12 100644 --- a/src/quick3d/qdeclarativemesh.cpp +++ b/src/quick3d/qdeclarativemesh.cpp @@ -188,7 +188,7 @@ void QDeclarativeMesh::setSource(const QUrl& value) QGLAbstractScene *s = QGLAbstractScene::loadScene(d->data.toLocalFile(), QString(), d->options); setScene(s); - } else if (d->data.scheme() == QLatin1String("qrc")) { + } else if (d->data.scheme().toLower() == QLatin1String("qrc")) { // strips off any qrc: prefix and any excess slashes and replaces it with :/ d->data.setScheme(""); QGLAbstractScene *s = QGLAbstractScene::loadScene( diff --git a/src/threed/textures/qgltexture2d.cpp b/src/threed/textures/qgltexture2d.cpp index a4df06f7..7463b25c 100644 --- a/src/threed/textures/qgltexture2d.cpp +++ b/src/threed/textures/qgltexture2d.cpp @@ -379,13 +379,13 @@ void QGLTexture2D::setUrl(const QUrl &url) } else { - if (url.scheme() == QLatin1String("file") || url.scheme() == QLatin1String("qrc")) + if (url.scheme() == QLatin1String("file") || url.scheme().toLower() == QLatin1String("qrc")) { QString fileName = url.toLocalFile(); // slight hack since there doesn't appear to be a QUrl::toResourcePath() function // to convert qrc:///foo into :/foo - if (url.scheme() == QLatin1String("qrc")) { + if (url.scheme().toLower() == QLatin1String("qrc")) { // strips off any qrc: prefix and any excess slashes and replaces it with :/ QUrl tempUrl(url); tempUrl.setScheme(""); |